package com.uidp.hibernatelayer;

import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.acsior.dac.impl.hibernate.vo.HibernateVO;

/**
 * AttributeType generated by hbm2java
 */
@Entity
@Table(name = "attribute_type", catalog = "uidpdb")
public class AttributeTypeVO extends HibernateVO {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = -3452481989203699093L;
	private Integer id;
	private String attributeName;
	private String description;
	private String label;
	private List<AttributesVO> attributeses ;

	// Constructors

	/** default constructor */
	public AttributeTypeVO() {
		this.attributeses = new ArrayList<AttributesVO>();
	}

	/** minimal constructor */
	public AttributeTypeVO(String attributeName, String label) {
		this.attributeName = attributeName;
		this.label = label;
	}

	/** full constructor */
	public AttributeTypeVO(String attributeName, String description,
			String label, List<AttributesVO> attributeses) {
		this.attributeName = attributeName;
		this.description = description;
		this.label = label;
		this.attributeses = attributeses;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "attribute_name", nullable = false, length = 30)
	public String getAttributeName() {
		return this.attributeName;
	}

	public void setAttributeName(String attributeName) {
		this.attributeName = attributeName;
	}

	@Column(name = "description", length = 150)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "label", nullable = false, length = 30)
	public String getLabel() {
		return this.label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "attributeType")
	public List<AttributesVO> getAttributeses() {
		return this.attributeses;
	}

	public void setAttributeses(List<AttributesVO> attributeses) {
		this.attributeses = attributeses;
	}

	@Override
	public void setId(Object id) {
		// TODO Auto-generated method stub

	}

}
